<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html {
            /* 使用百分比  */
            /* font-size: 62.5%; */
            /* 使用px  */
            font-size: 10px;
        }

        .c1 {
            font-size: 1rem;
        }

        .c12 {
            font-size: 1.2rem;
        }

        .c14 {
            font-size: 1.4rem;
        }

        .c16 {
            font-size: 1.6rem;
        }

        .c18 {
            font-size: 1.8rem;
        }

        .c2 {
            font-size: 2rem;
        }
    </style>
</head>

<body>
    <div>默认文本</div>
    <div class="c1">font-size: 1em;</div>
    <div class="c12">font-size: 1.2em;</div>
    <div class="c14">font-size: 1.4em;</div>
    <div class="c16">font-size: 1.6em;</div>
    <div class="c18">font-size: 1.8em;</div>
    <div class="c2">font-size: 2em;</div>
</body>

</html>